home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / TemplateMF / MkStubsOs < prev    next >
Text File  |  1995-07-31  |  3KB  |  114 lines

  1.  
  2.  
  3. # Template makefile to make all .o files
  4. # and the SDLS Stubs file for DeskLib
  5. # sublibraries.
  6. # Julian Smith 16 Mar 1995.
  7.  
  8.  
  9. # The macro $(ObjectFiles) should be set at the 
  10. # start of this file, to be a space-separated
  11. # list of object files.
  12. # This is done by 'Makatic'.
  13.  
  14.  
  15. # The macro $(LibName) should also be set at the 
  16. # start of this file, to be the name of the 
  17. # DeskLib sublibrary.
  18. # This is done by 'Makatic'.
  19.  
  20. # Compiler and linker flags, These can be anything. 
  21. # All flags required by Straylight (eg CC -zM and
  22. # Link -rmf) are included in the macros $(CC) and
  23. # $(LINK).
  24. #
  25. CCFlags        =    -fahi $(CCExtra) -depend !Depend -throwback -D_DeskLib_$(LibName) -I,C:
  26. ASMFlags    =    -Stamp -NoCache -CloseExec -Quit $(ASMExtra)
  27.  
  28.  
  29. # Macros for commands, including the Straylight
  30. # tool 'cdll'. Note that DRLink doesn't seem to
  31. # work with the SDLS.
  32. #
  33. CC        =    cc -c -zM -d_DLL -JC:DLLLib.,:mem $(CCFlags)
  34. ASM        =    ObjAsm $(ASMFlags)
  35. CDLL        =    cdll
  36. LINK        =    link
  37. AS        =    as -dde -throwback
  38.  
  39.  
  40. # filename of DLL Stubs aof file. This is linked with client apps.
  41. DLL_Stubs    =    Stubs
  42.  
  43.  
  44. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  45. #
  46. # DLL_Def:        Standard definition file as per SDLS docs.
  47. # DLL_OtherStubsSource    Assembler source to be partially linked into
  48. #            the final stubs file. This will force linking
  49. #            in of stubs from any other DLLs used by this
  50. #            library when a client application is built.
  51. # DLL_PlainStubs    The vanilla stubs file created by SDLS's cdll.
  52. # DLL_OtherStubsObject    Assembled from DLL_OtherStubsSource. This
  53. #            simply imports __DeskLib_SDLS_Stubs_<libname>'s
  54. #            for all DeskLib DLLs used by this library, and
  55. #            exports __DeskLib_SDLS_Stubs_<thislibname>.
  56. #
  57. DLL_Def            =    ^.DLLDef
  58. DLL_OtherStubsSource    =    ^.OtherStubs
  59.  
  60. DLL_PlainStubs        =    PlainStubs
  61. DLL_OtherStubsObject    =    OSObj
  62.  
  63. # -------------------------------------------------------
  64. # Everything below here should probably not be changed...
  65. # -------------------------------------------------------
  66.  
  67.  
  68.  
  69. # Now all the rules...
  70.  
  71.  
  72. # Here's the two things we want to make...
  73. #
  74. All:    $(DLL_Stubs) $(ObjectFiles)
  75.  
  76. $(DLL_Stubs):    $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  77.     $(LINK) -aof -o $@ $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  78.  
  79. $(DLL_PlainStubs):    $(DLL_Def)
  80.     $(CDLL) -def $(DLL_Def) -stub $(DLL_PlainStubs)
  81.  
  82.  
  83. #$(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  84. #    $(AS) -o $(DLL_OtherStubsObject) $(DLL_OtherStubsSource)
  85.  
  86. $(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  87.     $(ASM) $(ASMFlags) -from $(DLL_OtherStubsSource) -to $(DLL_OtherStubsObject) 
  88.  
  89.  
  90. $(DLL_Def):    
  91.     | Warning: No DLL definition file exists.
  92.     | Creating a default DLL definition file: $(DLL_Def)
  93.     | This will have to be altered by hand.
  94.     $(CDLL) -def $(DLL_Def) -obj $(ObjectFiles)
  95.  
  96.  
  97.  
  98. # Rule for compiling C source code for a Straylight dynamically-linked library.
  99.  
  100. VPATH = @.^
  101.  
  102. .SUFFIXES:    .o .c .s
  103.  
  104. .c.o:
  105.     $(CC) -o $@ $<
  106.  
  107. .s.o:
  108.     $(ASM) $(ASMFlags) -from $< -to $@
  109.  
  110.  
  111.  
  112. # Dynamic dependencies:
  113.